import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      // component: HomeView
      redirect: '/workplace' // 重定向
    },
    {
      path: '/workplace',
      name: 'workplace',
      component: () => import('@/views/workplace/index.vue')
    },
    {
      path: '/activity',
      name: 'activity',
      component: () => import('@/views/activity/index.vue')
    },
    {
      path: '/Labor',
      name: 'Labor',
      component: () => import('@/views/labor/index.vue')
    }
    // { path: '/', redirect: '/user' },
    // {
    //   path: '/user',
    //   name: 'User',
    //   component: () => import('../views/user/index.vue'),
    //   meta: {
    //     keepAlive: true
    //   }
    // }
  ]
})

export default router
